<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>NGUI: Next-Gen UI kit: UIDragObject Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI: Next-Gen UI kit
   &#160;<span id="projectnumber">3.7.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i_drag_object.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_u_i_drag_object-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UIDragObject Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Allows dragging of the specified target object by mouse or touch, optionally limiting it to be within the <a class="el" href="class_u_i_panel.html" title="UI Panel is responsible for collecting, sorting and updating widgets in addition to generating widget...">UIPanel</a>'s clipped rectangle.  
 <a href="class_u_i_drag_object.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for UIDragObject:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_u_i_drag_object.png" usemap="#UIDragObject_map" alt=""/>
  <map id="UIDragObject_map" name="UIDragObject_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:adf7efaaadad162a4f52e9631589da968"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968">DragEffect</a> { <a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968a6adf97f83acf6453d4a6a4b1070f3754">DragEffect.None</a>, 
<a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968a37323780191d51a33d295ac10fb98f06">DragEffect.Momentum</a>, 
<a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968acb2aae3250d3f30d81ddf44d37ace739">DragEffect.MomentumAndSpring</a>
 }</td></tr>
<tr class="separator:adf7efaaadad162a4f52e9631589da968"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6252641729cbd97f5c40d07d6cc2c230"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a6252641729cbd97f5c40d07d6cc2c230">CancelMovement</a> ()</td></tr>
<tr class="memdesc:a6252641729cbd97f5c40d07d6cc2c230"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cancel all movement.  <a href="#a6252641729cbd97f5c40d07d6cc2c230">More...</a><br /></td></tr>
<tr class="separator:a6252641729cbd97f5c40d07d6cc2c230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afde3e99d2063194ebe194382f6cbd031"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#afde3e99d2063194ebe194382f6cbd031">CancelSpring</a> ()</td></tr>
<tr class="memdesc:afde3e99d2063194ebe194382f6cbd031"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cancel the spring movement.  <a href="#afde3e99d2063194ebe194382f6cbd031">More...</a><br /></td></tr>
<tr class="separator:afde3e99d2063194ebe194382f6cbd031"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a35412483df626c3260a9b956cb850772"><td class="memItemLeft" align="right" valign="top">Transform&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a35412483df626c3260a9b956cb850772">target</a></td></tr>
<tr class="memdesc:a35412483df626c3260a9b956cb850772"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target object that will be dragged.  <a href="#a35412483df626c3260a9b956cb850772">More...</a><br /></td></tr>
<tr class="separator:a35412483df626c3260a9b956cb850772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ec790e8e489cdc0ee01141182e2cdd2"><td class="memItemLeft" align="right" valign="top">Vector3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a3ec790e8e489cdc0ee01141182e2cdd2">scrollMomentum</a> = Vector3.zero</td></tr>
<tr class="memdesc:a3ec790e8e489cdc0ee01141182e2cdd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Momentum added from the mouse scroll wheel.  <a href="#a3ec790e8e489cdc0ee01141182e2cdd2">More...</a><br /></td></tr>
<tr class="separator:a3ec790e8e489cdc0ee01141182e2cdd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affafd3bbecf51eea661e841edc6f0686"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#affafd3bbecf51eea661e841edc6f0686">restrictWithinPanel</a> = false</td></tr>
<tr class="memdesc:affafd3bbecf51eea661e841edc6f0686"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the dragging will be restricted to be within the parent panel's bounds.  <a href="#affafd3bbecf51eea661e841edc6f0686">More...</a><br /></td></tr>
<tr class="separator:affafd3bbecf51eea661e841edc6f0686"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7233e2f3ec9020f0efc262a53a0191cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_rect.html">UIRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a7233e2f3ec9020f0efc262a53a0191cf">contentRect</a> = null</td></tr>
<tr class="memdesc:a7233e2f3ec9020f0efc262a53a0191cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rectangle to be used as the draggable object's bounds. If none specified, all widgets' bounds get added up.  <a href="#a7233e2f3ec9020f0efc262a53a0191cf">More...</a><br /></td></tr>
<tr class="separator:a7233e2f3ec9020f0efc262a53a0191cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a53af73daa5b58f63e253dfb371d3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968">DragEffect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#aa8a53af73daa5b58f63e253dfb371d3b">dragEffect</a> = DragEffect.MomentumAndSpring</td></tr>
<tr class="memdesc:aa8a53af73daa5b58f63e253dfb371d3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Effect to apply when dragging.  <a href="#aa8a53af73daa5b58f63e253dfb371d3b">More...</a><br /></td></tr>
<tr class="separator:aa8a53af73daa5b58f63e253dfb371d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7db2a160d3ac0004048ebbc813d2026e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a7db2a160d3ac0004048ebbc813d2026e">momentumAmount</a> = 35f</td></tr>
<tr class="memdesc:a7db2a160d3ac0004048ebbc813d2026e"><td class="mdescLeft">&#160;</td><td class="mdescRight">How much momentum gets applied when the press is released after dragging.  <a href="#a7db2a160d3ac0004048ebbc813d2026e">More...</a><br /></td></tr>
<tr class="separator:a7db2a160d3ac0004048ebbc813d2026e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a7565a3ba5979cd0bdcf1472aefeef1bc"><td class="memItemLeft" align="right" valign="top">Vector3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a7565a3ba5979cd0bdcf1472aefeef1bc">scale</a> = new Vector3(1f, 1f, 0f)</td></tr>
<tr class="separator:a7565a3ba5979cd0bdcf1472aefeef1bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a3ddbff82a53a32f3c762cf203bc2625d"><td class="memItemLeft" align="right" valign="top">Vector3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_drag_object.html#a3ddbff82a53a32f3c762cf203bc2625d">dragMovement</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a3ddbff82a53a32f3c762cf203bc2625d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction.  <a href="#a3ddbff82a53a32f3c762cf203bc2625d">More...</a><br /></td></tr>
<tr class="separator:a3ddbff82a53a32f3c762cf203bc2625d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Allows dragging of the specified target object by mouse or touch, optionally limiting it to be within the <a class="el" href="class_u_i_panel.html" title="UI Panel is responsible for collecting, sorting and updating widgets in addition to generating widget...">UIPanel</a>'s clipped rectangle. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="adf7efaaadad162a4f52e9631589da968"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968">UIDragObject.DragEffect</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="adf7efaaadad162a4f52e9631589da968a6adf97f83acf6453d4a6a4b1070f3754"></a>None&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="adf7efaaadad162a4f52e9631589da968a37323780191d51a33d295ac10fb98f06"></a>Momentum&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="adf7efaaadad162a4f52e9631589da968acb2aae3250d3f30d81ddf44d37ace739"></a>MomentumAndSpring&#160;</td><td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6252641729cbd97f5c40d07d6cc2c230"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIDragObject.CancelMovement </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cancel all movement. </p>

</div>
</div>
<a class="anchor" id="afde3e99d2063194ebe194382f6cbd031"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIDragObject.CancelSpring </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cancel the spring movement. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a7233e2f3ec9020f0efc262a53a0191cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_rect.html">UIRect</a> UIDragObject.contentRect = null</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rectangle to be used as the draggable object's bounds. If none specified, all widgets' bounds get added up. </p>

</div>
</div>
<a class="anchor" id="aa8a53af73daa5b58f63e253dfb371d3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_drag_object.html#adf7efaaadad162a4f52e9631589da968">DragEffect</a> UIDragObject.dragEffect = DragEffect.MomentumAndSpring</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Effect to apply when dragging. </p>

</div>
</div>
<a class="anchor" id="a7db2a160d3ac0004048ebbc813d2026e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float UIDragObject.momentumAmount = 35f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>How much momentum gets applied when the press is released after dragging. </p>

</div>
</div>
<a class="anchor" id="affafd3bbecf51eea661e841edc6f0686"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UIDragObject.restrictWithinPanel = false</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Whether the dragging will be restricted to be within the parent panel's bounds. </p>

</div>
</div>
<a class="anchor" id="a7565a3ba5979cd0bdcf1472aefeef1bc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vector3 UIDragObject.scale = new Vector3(1f, 1f, 0f)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a3ec790e8e489cdc0ee01141182e2cdd2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Vector3 UIDragObject.scrollMomentum = Vector3.zero</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Momentum added from the mouse scroll wheel. </p>

</div>
</div>
<a class="anchor" id="a35412483df626c3260a9b956cb850772"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Transform UIDragObject.target</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Target object that will be dragged. </p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a3ddbff82a53a32f3c762cf203bc2625d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vector3 UIDragObject.dragMovement</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/NGUI/Assets/NGUI/Scripts/Interaction/<a class="el" href="_u_i_drag_object_8cs.html">UIDragObject.cs</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i_drag_object.html">UIDragObject</a></li>
    <li class="footer">Generated on Sat Sep 13 2014 05:29:18 for NGUI: Next-Gen UI kit by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
